import pygame
import util

_SOUNDS = {}

def load():
    global _SOUNDS
    try:
		# play background music
		pygame.mixer.music.load(util.file_path('music.mp3'))
		pygame.mixer.music.play(1)
		_SOUNDS['menu'] = pygame.mixer.Sound(util.file_path('menu' + '.ogg'))
		# load sound effect
		# for i in ('1', '2', '3', '4', 'drop', 'menu'):
			# _SOUNDS[i] = pygame.mixer.Sound(util.file_path(i + '.ogg'))
    except:
        pass

    

    
    
    

def play_sound(name):
    try:
        _SOUNDS[name].play()
    except:
        pass
